package com.pcbly.web.business.table;

import java.util.List;

import com.pcbly.web.bean.table.TableBean;
import com.pcbly.web.bean.table.TableChildBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.persistence.table.TableDao;

public class TableServiceImp extends BaseServiceImp<TableBean> implements
		TableService {

	public TableServiceImp() {
		super();
	}

	private TableDao tableDao;

	public void setTableDao(TableDao tableDao) {
		this.tableDao = tableDao;
	}

	@Override
	public void deleteTableBean(String id) throws Exception {
		// TODO Auto-generated method stub
		tableDao.removeById(id);
	}

	@Override
	public List<TableBean> findTableBeansFromDatabase() throws Exception {
		// TODO Auto-generated method stub
		return tableDao.findTableBeansFromDatabase();
	}

	@Override
	public List<TableBean> getTableBeans() throws Exception {
		// TODO Auto-generated method stub
		return tableDao.getTableBeans();
	}

	@Override
	public void saveTableBean(TableBean bean) throws Exception {
		// TODO Auto-generated method stub
		tableDao.saveTableBean(bean);
	}

	@Override
	public void saveTableBeans(List<TableBean> beans) throws Exception {
		// TODO Auto-generated method stub
		tableDao.saveTableBeans(beans);
	}

	@Override
	public void updateTableBean(TableBean bean) throws Exception {
		// TODO Auto-generated method stub
		tableDao.updateTableBean(bean);
	}

	@Override
	public void updateTableBeans(List<TableBean> beans) throws Exception {
		// TODO Auto-generated method stub
		tableDao.updateTableBeans(beans);
	}

	@Override
	public void deleteTableBeans(List<TableBean> beans) throws Exception {
		// TODO Auto-generated method stub
		tableDao.deleteTableBeans(beans);
	}

	@Override
	public void deleteTableBeansById(String id) throws Exception {
		// TODO Auto-generated method stub
		tableDao.deleteTableBeansById(id);
	}

	@Override
	public TableBean getTableBeanById(String id) throws Exception {
		// TODO Auto-generated method stub
		return tableDao.get(id);
	}

	@Override
	public List<TableChildBean> findTableChildBeans() throws Exception {
		// TODO Auto-generated method stub
		return tableDao.findTableChildBeans();
	}

	@Override
	public boolean checkName(String name) throws Exception {
		// TODO Auto-generated method stub
		return tableDao.checkName(name);
	}

	@Override
	public List<TableBean> findTableBeansByTableIds(String tableIds)
			throws Exception {
		// TODO Auto-generated method stub
		return tableDao.findTableBeansByTableIds(tableIds);
	}

	@Override
	public String getTableBeanFromDataBase(String tableName) throws Exception {
		// TODO Auto-generated method stub
		return tableDao.getTableBeanFromDataBase(tableName);
	}

}
